﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Reflection;

namespace SDT.DataService.Contexts
{
  public  class News_CategoryContext : BDS_SpiderDataContext
    {
        [Function(Name = "dbo.UpdateCategory")]
        public int UpdateCategory([Parameter(Name = "CateID", DbType = "Int")] System.Nullable<int> cateID, [Parameter(Name = "Name", DbType = "NVarChar(500)")] string name)
        {
            IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), cateID, name);
            return ((int)(result.ReturnValue));
        }

        [Function(Name = "dbo.InsertCategory")]
        public int InsertCategory([Parameter(Name = "OriginalCategoryId", DbType = "Int")] System.Nullable<int> originalCategoryId, [Parameter(Name = "SiteID", DbType = "Int")] System.Nullable<int> siteID, [Parameter(Name = "Name", DbType = "NVarChar(500)")] string name)
        {
            IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), originalCategoryId, siteID, name);
            return ((int)(result.ReturnValue));
        }
    }
}
